package com.xuecheng.ucenter.controller;

import com.xuecheng.api.ucenter.UcenterControllerApi;
import com.xuecheng.framework.domain.ucenter.ext.XcUserExt;
import com.xuecheng.ucenter.service.XcUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhaoxiang
 * @version 1.0
 * @Date 2020/2/17 21:08
 */
@RestController
@RequestMapping("/ucenter")
public class UcenterController implements UcenterControllerApi {

    @Autowired
    private XcUserService xcUserService;

    /**
     * 根据账户查询用户信息
     * @param username 账户名称
     * @return
     */
    @Override
    @GetMapping("/getuserext")
    public XcUserExt getUserExt(String username) {
        return xcUserService.getUserExt(username);
    }
}
